import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'ion:settings-outline',
      keepAlive: true,
      order: 1000,
      title: $t('system.title'),
      authority: ['AbpIdentity.Users', 'AbpIdentity.Roles'], // ABP用户管理和角色管理权限
    },
    name: 'System',
    path: '/system',
    children: [
      {
        meta: {
          title: $t('system.user.title'),
          authority: ['AbpIdentity.Users'], // ABP用户管理权限
        },
        name: '用户管理',
        path: '/system/user',
        component: () => import('#/views/system/user/index.vue'),
      },
      {
        meta: {
          title: $t('system.role.title'),
          authority: ['AbpIdentity.Roles'], // ABP角色管理权限
        },
        name: '角色管理',
        path: '/system/role',
        component: () => import('#/views/system/role/index.vue'),
      },
      // {
      //   meta: {
      //     title: $t('system.dictionary.title'),
      //   },
      //   name: '字典管理',
      //   path: '/system/dictionary',
      //   component: () => import('#/views/system/dictionary/index.vue'),
      // },
      // {
      //   meta: {
      //     title: 'Antd',
      //   },
      //   name: 'AntDesignDemos',
      //   path: '/system/ant-design',
      //   component: () => import('#/views/demos/antd/index.vue'),
      // },
    ],
  },
];

export default routes;
